﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fcdbas.Biz
{
    /// <summary>
    /// window startup behavior
    /// </summary>
    public enum WSBehavior
    {
        Empty,
        NewRecord,
        ShowQuery,
        Populate
    }
    public class ItemSetting
    {
        public string Caption
        {
            get;
            set;
        }
        public string ColumnName
        {
            get;
            set;
        }
        public bool IsSet
        {
            get;
            set;
        }
        public bool IsDesignSet
        {
            get;
            set;
        }
    }
    public class DataSourceSetting
    {
        public string Name
        {
            get;
            set;
        }
        public List<ItemSetting> RequireItems
        {
            get;
            set;
        }
        public List<ItemSetting> ReadOnlyItems
        {
            get;
            set;
        }
    }
    public class WindowProfile
    {
        public WSBehavior Behavior
        {
            get;
            set;
        }
        public int RecordLimit
        {
            get;
            set;
        }
        /// <summary>
        /// 窗体完整类名，跟权限的一致
        /// </summary>
        public string PreObject
        {
            get;
            set;
        }
        public string UserWhere
        {
            get;
            set;
        }
        public List<DataSourceSetting> DataSourceItems
        {
            get;
            set;
        }
    }
}
